<?php

/**
 * Contact filter form.
 *
 * @package    Porba
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormFilterTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class ContactFormFilter extends BaseContactFormFilter
{
  public function configure()
  {
        $this->disableLocalCSRFProtection();

        $this->widgetSchema['companyname'] = new sfWidgetFormFilterInput(array(
            'with_empty' => false,
            'label' => 'Company',
        ));
        
        $this->widgetSchema['contact_code'] = new sfWidgetFormFilterInput(array(
            'with_empty' => false,
            'label' => 'Code',
        ));
        
        
        $w = new sfWidgetFormFilterInput(array('with_empty' => false));
        $w->setOption('label', 'Contact number');
        $this->setWidget('id', $w);
        $this->setValidator('id', new sfValidatorSchemaFilter('text', new sfValidatorNumber(array('required' => false))));

        $this->useFields(array('id', 'contact_code', 'category_name', 'name'));
  }
}
